Setting the Config

The config file, fValidate.config.js, contains many settings that determine how fValidate operates and behaves.

Config table
Config itemTypeDefault valueDescription
Config itemTypeDefault valueDescription
this.codeStringaltThis is the HTML attribute fValidate will look for to identify fValidate validation codes.
this.esmgStringemsgThe HTML attribute specified by this value can be used to override fValidate's built-in error messages. More details here.
this.patternStringpatternThe HTML attribute specified by this value is used explicitly by the custom validator.
this.errorClassStringerrHiliteThe CSS class name to be applied to label and/or input elements when an error occurs.
this.useSingleClassNamesBooleanfalseThis flag tells fValidate to use only single CSS class names (replaces existing with errorClass) instead of multiple class names (appending errorClass to existing class name), which is the default.
this.clearEventMixedchangeThis event will clear any visible error notification upon it's firing from the element of focus. Possible values are 'change', 'blur', or null.
this.confirmMsgStringYour data is about to be sent.\nPlease click 'Ok' to proceed or 'Cancel' to abort.This message will be displayed as a confirmation to the user that they wish to send the data. More details here.
this.confirmAbortMsgStringSubmission cancelled. Data has not been sent.If the users cancels the above alert, this follow-up message will be alerted. Setting this to an empty string ('') will skip this alert.
this.submitButtonMixedSubmitIf you have setup fValidate to disable the submit button(s), the name of that submit button must be entered here. If you have more than one submit button, enter an array of their names. Example: this.submitButton = new Array( 'Submit_Preview', 'Submit_Commit' );
this.resetButtonStringResetIf you have setup fValidate to disable the reset button, the name of that reset button must be entered here.
this.ccTypeStringCredit_Card_TypeIf you are using the cc validation type (credit cards), then you'll need to set this value. The name of the select element that contains the type of credit card used must be entered here.

Note - This element must be in the same form as the element that will hold the credit card number.

this.ccTypeObjStringform1.Credit_Card_TypeThe full DOM name of the select element used to determine the credit card type.

Note - The config value below exists for backwards compatibility with fValidate 3.55b. If you have a newer version, use the above "ccType" instead.

this.boxErrorStringerrorsIf you choose to use the box error mode, you must insert the ID of the element used by that mode here.
this.boxErrorPrefixStringfv_error_Each error notice added when using the box error-mode recieves an ID. Those ID's are prefixed by this value. I placed it in the config in the event that it causes a conflict with something you already have, however unlikely. This will rarely, if ever, need to be changed.